Detecting transmission states of a paper currency in a channel by using an optical sensor is a method generally used in an ATM. A detection apparatus for a paper currency and the like in the prior art usually includes an optical sensor, a control unit and a storage unit. A group of sensor state sequences representing information of paper currencies may be generated under triggering of a given clock when a group of paper currencies pass through the optical sensor in sequence, and the group of the sensor state sequences, after being binarized by the sensor unit, may be described as time sequence logical states shown in Table 1:
TABLE 1time sequences ofoutput states of sensor unitlogical state Z of paper currencycurrent state (Q0)next state (Q1)paper currency arrival (S4)lighted (L)shielded (D)paper currency existence (S3)shielded (D)shielded (D)paper currency leave (S2)shielded (D)lighted (L)paper currency nonexistence (S1)lighted (L)lighted (L)
The transformation among the logical states of the paper currency is implemented by the control unit, the employed method is shown in FIG. 1, where X represents the state value outputted from the sensor unit; the control unit and the storage unit perform different operations according to the logical states of the paper currency and finally record the paper currency information, the commonly-used method is shown in Table 2:
TABLE 2logical state Z ofcorresponding processcorresponding process ofpaper currencyof control unitstorage unitpaper currencyadjusting the value ofstarting collection of thearrival (S4)the record pointer tosensor statemake it point to thenext storage locationpaper currencycollecting the sensor stateexistence (S3)paper currencycalculating paper currencyleave (S2)information and storing it tothe location pointed by the paper currencyrecord pointernonexistence (S1)
According to the record method of Table 2, normally only one “paper currency arrival” state and only one “paper currency leave” state can occur to the control unit during the whole collection period when a complete paper currency passes through the optical sensor, and therefore an piece of unique paper currency record information corresponds to the paper currency.
However, paper currencies of various counties in the world are different in design, and paper currencies of some counties themselves have features such as holes and gaps; moreover, the paper currency is easy to be damaged during circulation and is worsened gradually. So several “paper currency arrival” states and several “paper currency leave” states might occur when the worsened paper currency passes through the optical sensor (for example, the damaged paper currency has gaps), and thus several pieces of record information are generated for one paper currency. As a result, the state machine shown in FIG. 1 cannot meet the requirement of the paper currency detection for such a case.